home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat3 / Tk / timerhndlr.z / timerhndlr
Text File  |  1998-10-30  |  6KB  |  133 lines

  1.  
  2.  
  3.  
  4. TTTTkkkk____CCCCrrrreeeeaaaatttteeeeTTTTiiiimmmmeeeerrrrHHHHaaaannnnddddlllleeeerrrr((((3333TTTTkkkk))))                          TTTTkkkk____CCCCrrrreeeeaaaatttteeeeTTTTiiiimmmmeeeerrrrHHHHaaaannnnddddlllleeeerrrr((((3333TTTTkkkk))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      Tk_CreateTimerHandler, Tk_DeleteTimerHandler - call a procedure at a
  10.      given time
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ttttkkkk....hhhh>>>>
  14.  
  15.      Tk_TimerToken
  16.      TTTTkkkk____CCCCrrrreeeeaaaatttteeeeTTTTiiiimmmmeeeerrrrHHHHaaaannnnddddlllleeeerrrr(_m_i_l_l_i_s_e_c_o_n_d_s, _p_r_o_c, _c_l_i_e_n_t_D_a_t_a)
  17.  
  18.      TTTTkkkk____DDDDeeeelllleeeetttteeeeTTTTiiiimmmmeeeerrrrHHHHaaaannnnddddlllleeeerrrr(_t_o_k_e_n)
  19.  
  20. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  21.      int             _m_i_l_l_i_s_e_c_o_n_d_s   (in)      How many milliseconds to wait
  22.                                               before invoking _p_r_o_c.
  23.  
  24.      Tk_TimerProc    *_p_r_o_c          (in)      Procedure to invoke after
  25.                                               _m_i_l_l_i_s_e_c_o_n_d_s have elapsed.
  26.  
  27.      ClientData      _c_l_i_e_n_t_D_a_t_a     (in)      Arbitrary one-word value to pass
  28.                                               to _p_r_o_c.
  29.  
  30.      Tk_TimerToken   _t_o_k_e_n          (in)      Token for previously-created
  31.                                               timer handler (the return value
  32.                                               from some previous call to
  33.                                               TTTTkkkk____CCCCrrrreeeeaaaatttteeeeTTTTiiiimmmmeeeerrrrHHHHaaaannnnddddlllleeeerrrr).
  34.  
  35.  
  36. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  37.      TTTTkkkk____CCCCrrrreeeeaaaatttteeeeTTTTiiiimmmmeeeerrrrHHHHaaaannnnddddlllleeeerrrr arranges for _p_r_o_c to be invoked at a time
  38.      _m_i_l_l_i_s_e_c_o_n_d_s milliseconds in the future.  The callback to _p_r_o_c will be
  39.      made by TTTTkkkk____DDDDooooOOOOnnnneeeeEEEEvvvveeeennnntttt, so TTTTkkkk____CCCCrrrreeeeaaaatttteeeeTTTTiiiimmmmeeeerrrrHHHHaaaannnnddddlllleeeerrrr is only useful in
  40.      programs that dispatch events through TTTTkkkk____DDDDooooOOOOnnnneeeeEEEEvvvveeeennnntttt or through other Tk
  41.      procedures that call TTTTkkkk____DDDDooooOOOOnnnneeeeEEEEvvvveeeennnntttt, such as TTTTkkkk____MMMMaaaaiiiinnnnLLLLoooooooopppp.  The call to
  42.      _p_r_o_c may not be made at the exact time given by _m_i_l_l_i_s_e_c_o_n_d_s:  it will be
  43.      made at the next opportunity after that time.  For example, if
  44.      TTTTkkkk____DDDDooooOOOOnnnneeeeEEEEvvvveeeennnntttt isn't called until long after the time has elapsed, or if
  45.      there are other pending events to process before the call to _p_r_o_c, then
  46.      the call to _p_r_o_c will be delayed.
  47.  
  48.      _P_r_o_c should have arguments and return value that match the type
  49.      TTTTkkkk____TTTTiiiimmmmeeeerrrrPPPPrrrroooocccc:
  50.           typedef void Tk_TimerProc(ClientData _c_l_i_e_n_t_D_a_t_a);
  51.      The _c_l_i_e_n_t_D_a_t_a parameter to _p_r_o_c is a copy of the _c_l_i_e_n_t_D_a_t_a argument
  52.      given to TTTTccccllll____CCCCrrrreeeeaaaatttteeeeTTTTiiiimmmmeeeerrrrHHHHaaaannnnddddlllleeeerrrr when the callback was created.
  53.      Typically, _c_l_i_e_n_t_D_a_t_a points to a data structure containing application-
  54.      specific information about what to do in _p_r_o_c.
  55.  
  56.      TTTTkkkk____DDDDeeeelllleeeetttteeeeTTTTiiiimmmmeeeerrrrHHHHaaaannnnddddlllleeeerrrr may be called to delete a previously-created timer
  57.      handler.  It deletes the handler indicated by _t_o_k_e_n so that no call to
  58.      _p_r_o_c will be made;  if that handler no longer exists (e.g. because the
  59.      time period has already elapsed and _p_r_o_c has been invoked) then
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. TTTTkkkk____CCCCrrrreeeeaaaatttteeeeTTTTiiiimmmmeeeerrrrHHHHaaaannnnddddlllleeeerrrr((((3333TTTTkkkk))))                          TTTTkkkk____CCCCrrrreeeeaaaatttteeeeTTTTiiiimmmmeeeerrrrHHHHaaaannnnddddlllleeeerrrr((((3333TTTTkkkk))))
  71.  
  72.  
  73.  
  74.      TTTTkkkk____DDDDeeeelllleeeetttteeeeTTTTiiiimmmmeeeerrrrHHHHaaaannnnddddlllleeeerrrr does nothing.
  75.  
  76.  
  77. KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  78.      callback, clock, handler, timer
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.